﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TestRotate : MonoBehaviour
{
    public float xAngle, yAngle, zAngle;

    public GameObject cube1, cube2;

    void Awake()
    {
        cube1.name = "Self";

        cube2.name = "World";
    }

    void Update()
    {
        //cube1.transform.Rotate(xAngle, yAngle, zAngle, Space.Self);
        //cube2.transform.Rotate(xAngle, yAngle, zAngle, Space.World);

        Vector3 vector3 = new Vector3(xAngle, yAngle, zAngle);
        cube1.transform.Rotate(vector3, Space.Self);
        cube2.transform.Rotate(vector3, Space.World);
    }
}
